home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / x68000.arc / SOURCE.ARC / CODEGENE.DEF next >
Encoding:
Modula Definition  |  1985-12-03  |  1.3 KB  |  38 lines

  1. DEFINITION MODULE CodeGenerator;
  2. (* Uses information supplied by Parser, OperationCodes, *)
  3. (* and SyntaxAnalyzer to produce the object code.       *)
  4.  
  5.    FROM Parser IMPORT
  6.       TOKEN, OPERAND;
  7.  
  8.    FROM LongNumbers IMPORT
  9.       LONG;
  10.  
  11.  
  12.    EXPORT QUALIFIED
  13.       LZero, AddrCnt, Pass2, BuildSymTable, AdvAddrCnt, GetObjectCode;
  14.  
  15.  
  16.    VAR
  17.       LZero, AddrCnt : LONG;
  18.       Pass2 : BOOLEAN;
  19.  
  20.  
  21.    PROCEDURE BuildSymTable (VAR AddrCnt : LONG; 
  22.                             Label, OpCode : TOKEN; SrcOp, DestOp : OPERAND);
  23.    (* Builds symbol table from symbolic information of Source File *)
  24.  
  25.  
  26.    PROCEDURE AdvAddrCnt (VAR AddrCnt : LONG);
  27.    (* Advances the address counter based on the length of the instruction *)
  28.  
  29.  
  30.    PROCEDURE GetObjectCode (Label, OpCode : TOKEN;
  31.                             SrcOp, DestOp : OPERAND;
  32.                             VAR AddrCnt, ObjOp, ObjSrc, ObjDest : LONG;
  33.                             VAR   nA,      nO,    nS,     nD    : CARDINAL);
  34.    (* Determines the object code for the operation as well as the operands *)
  35.    (* Returns each (up to 3 fields), along with their length               *) 
  36.  
  37. END CodeGenerator.
  38.